package com.bird.weibo;

import weibo4j.Timeline;
import weibo4j.http.ImageItem;

public class SendWeibo {
	public void sendWeibo(String token,String Weibostatus,byte[] content) throws Exception {
	
		//	byte[] content = readFileImage(args[2]);
			System.out.println("content length:" + content.length);
			ImageItem pic = new ImageItem("pic", content);
			String s = java.net.URLEncoder.encode(Weibostatus, "utf-8");
			Timeline tl = new Timeline();
			tl.client.setToken(token);// access_token
			tl.UploadStatus(s, pic);

	//			System.out.println("Successfully upload the status to ["
	//					+ status.getText() + "].");
		
	}

	
}
